package com.doform.android.xianggucheng.retrofit.subscriber;

import com.doform.android.xianggucheng.utils.TsUtils;

import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

/**
 * 作者 Y_MS
 * Created by ${APEN} on 2017-07-19.
 * GitHub：https://github.com/cxydxpx
 */

public abstract class ErrorHandleSubscriber<T> implements Observer<T> {

    @Override
    public void onSubscribe(Disposable d) {
    }

    @Override
    public void onError(Throwable e) {

        try {

            TsUtils.showToast(e.getMessage());
            e.printStackTrace();

        } catch (Exception n) {

        }


    }

    @Override
    public void onComplete() {
    }
}
